home *** CD-ROM | disk | FTP | other *** search
/ Nebula 1 / Nebula One.iso / Utilities / Workspace / Locus / Source / MainController.h < prev    next >
Text File  |  1995-06-12  |  2KB  |  86 lines

  1.  
  2. /*
  3.     Copyright 1993  Jeremy Slade.
  4.  
  5.     You are free to use all or any parts of the Locus project
  6.     however you wish, just give credit where credit is due.
  7.     The author (Jeremy Slade) shall not be held responsible
  8.     for any damages that result out of use or misuse of any
  9.     part of this project.
  10.  
  11. */
  12.  
  13. /*
  14.     Project: Locus
  15.     
  16.     Class: MainController
  17.     
  18.     Description:
  19.  
  20.     This class is the delegate of NXApp, and its main function is to direct the program flow.  A lot of the functionality that should be in this class is implemented by the FolderController, and it probably would have been cleaner and more intuitive to have a single Controller class, but that is not what happened.  This setup works, though it is not completely clear which controller is responsible for what, so I'm not going to worry about it at this point...
  21.     
  22.     Original Author: Jeremy Slade
  23.     
  24.     Revision History:
  25.         Created
  26.             V.101    JGS Tue Feb  2 18:05:03 GMT-0700 1993
  27.  
  28. */
  29.  
  30. #ifndef MainController_h
  31. #define MainController_h
  32.  
  33. #define MainController_VERSION    (101)
  34.  
  35.  
  36. #import <objc/Object.h>
  37. #import <appkit/graphics.h> // For NXRect
  38. #import <appkit/Window.h>
  39.  
  40.  
  41. @interface MainController : Object
  42. {
  43.     id    infoPanel;
  44.     id    preferences;
  45.     
  46.     id    theFolderController;    // Just points to global instance
  47.                                 // Used for connecting in nib file
  48. }
  49.  
  50. // Creating, initializing
  51. + initialize;
  52. - init;
  53. - free;
  54.  
  55. // Application delegate methods
  56. - appWillInit:sender;
  57. - appDidInit:sender;
  58. - appWillTerminate:sender;
  59. - appDidResignActive:sender;
  60. - appDidBecomeActive:sender;
  61. - appDidHide:sender;
  62. - (int)app:sender openFile:(const char *)filename type:(const char *)aType;
  63. - (BOOL)appAcceptsAnotherFile:sender;
  64. - powerOff:(NXEvent *)theEvent;
  65. - app:sender powerOffIn:(int)ms andSave:(BOOL)aFlag;
  66.  
  67. // Info
  68. - showInfoPanel:sender;
  69.  
  70. // Prefs panel
  71. - showPrefsPanel:sender;
  72. - readPrefs:sender;
  73. - writePrefs:sender;
  74.  
  75. // Activation
  76. - showActivator:sender;
  77. - hideActivator:sender;
  78. - activatorHit:sender;
  79. - doneActivating:sender;
  80. - activator;
  81.  
  82. @end
  83.  
  84.  
  85. #endif // MainController_h
  86.